<template>
    <div>
        <div class="index">
            <div class="w1">
                <span class="ti1">收到的赞</span>
            </div>
            <div class="w2">
                <span class="ti2" v-for="i in settingsNa" :key="i" @click="setUp(i)" :style="{color: index === i ? '#00c3ff' : ''}">{{i}}</span>
            </div>
            <div class="w3">
                <router-view />
            </div>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            index: '所有赞',
            settingsNa: ['所有赞', '我关注的']
        }
    },
    methods: {
        setUp(n) {
            this.index = n
            if(n === '所有赞') {
                this.$router.push('/all_replies3')
            }else if(n === '我关注的') {
                this.$router.push('/what_I_care_about3')
            }
        }
    }
}
</script>

<style lang="less" scoped>
    .index {
        .w1 {
            border-bottom: 1px solid #ccc;
            padding: 6px;
            .ti1 {
                font-size: 20px;
            }
        }
        .w2 {
            margin-top: 6px;
            .ti2 {
                color: #ccc;
                padding-left: 10px;
                cursor: pointer;
            }
        }
        .w3 {
            width: 97%;
            margin-left: 9px;
        }
    }
</style>